.class public Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;
.super Landroid/widget/BaseAdapter;
.source "DealerAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;
    }
.end annotation


# instance fields
.field TAG:Ljava/lang/String;

.field private flag:Z

.field list:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/selectcar/Object/Dealer;",
            ">;"
        }
    .end annotation
.end field

.field private mInflater:Landroid/view/LayoutInflater;


# direct methods
.method public constructor <init>(Ljava/util/ArrayList;Landroid/content/Context;)V
    .locals 1
    .parameter
    .parameter "context"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/selectcar/Object/Dealer;",
            ">;",
            "Landroid/content/Context;",
            ")V"
        }
    .end annotation

    .prologue
    .line 28
    .local p1, list:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/bitauto/autoeasy/selectcar/Object/Dealer;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 25
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->flag:Z

    .line 26
    const-string v0, "DealerAdapter"

    iput-object v0, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->TAG:Ljava/lang/String;

    .line 29
    iput-object p1, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->list:Ljava/util/ArrayList;

    .line 30
    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->mInflater:Landroid/view/LayoutInflater;

    .line 31
    return-void
.end method

.method public constructor <init>(Ljava/util/ArrayList;Landroid/content/Context;Z)V
    .locals 1
    .parameter
    .parameter "context"
    .parameter "flag"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/selectcar/Object/Dealer;",
            ">;",
            "Landroid/content/Context;",
            "Z)V"
        }
    .end annotation

    .prologue
    .line 33
    .local p1, list:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/bitauto/autoeasy/selectcar/Object/Dealer;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 25
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->flag:Z

    .line 26
    const-string v0, "DealerAdapter"

    iput-object v0, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->TAG:Ljava/lang/String;

    .line 34
    iput-object p1, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->list:Ljava/util/ArrayList;

    .line 35
    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->mInflater:Landroid/view/LayoutInflater;

    .line 36
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->flag:Z

    .line 37
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 41
    iget-object v0, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->list:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 46
    iget-object v0, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->list:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 106
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 7
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    const/4 v6, 0x0

    .line 62
    move-object v2, p2

    .line 64
    .local v2, root:Landroid/view/View;
    if-nez v2, :cond_1

    .line 65
    new-instance v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;

    invoke-direct {v1}, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;-><init>()V

    .line 66
    .local v1, holder:Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;
    iget-object v3, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->mInflater:Landroid/view/LayoutInflater;

    const v4, 0x7f030006

    const/4 v5, 0x0

    invoke-virtual {v3, v4, v5}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    .line 68
    const/high16 v3, 0x7f0b

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->name:Landroid/widget/TextView;

    .line 69
    const v3, 0x7f0b0006

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->mode:Landroid/widget/TextView;

    .line 70
    const v3, 0x7f0b0003

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->adder:Landroid/widget/TextView;

    .line 71
    const v3, 0x7f0b0007

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->phone:Landroid/widget/TextView;

    .line 72
    const v3, 0x7f0b0008

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->vendorPrice:Landroid/widget/TextView;

    .line 74
    invoke-virtual {v2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 79
    :goto_0
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    .line 80
    .local v0, dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;
    iget-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->name:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 81
    iget-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->mode:Landroid/widget/TextView;

    invoke-virtual {v3, v6}, Landroid/widget/TextView;->setVisibility(I)V

    .line 82
    iget-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->mode:Landroid/widget/TextView;

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "["

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorBizMode()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "]"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 83
    iget-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->phone:Landroid/widget/TextView;

    invoke-virtual {v3, v6}, Landroid/widget/TextView;->setVisibility(I)V

    .line 84
    iget-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->phone:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getCallCenterNumber()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 85
    iget-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->adder:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorSaleAddr()Ljava/lang/String;

    move-result-object v4

    const/16 v5, 0x19

    invoke-static {v4, v5}, Lcom/bitauto/autoeasy/tool/ToolBox;->ToEllipsis(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 86
    iget-boolean v3, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->flag:Z

    if-eqz v3, :cond_0

    .line 87
    iget-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->vendorPrice:Landroid/widget/TextView;

    invoke-virtual {v3, v6}, Landroid/widget/TextView;->setVisibility(I)V

    .line 88
    iget-object v3, v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;->vendorPrice:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVcl_VendorPrice()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 91
    :cond_0
    return-object v2

    .line 76
    .end local v0           #dealer:Lcom/bitauto/autoeasy/selectcar/Object/Dealer;
    .end local v1           #holder:Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;
    :cond_1
    invoke-virtual {v2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;

    .restart local v1       #holder:Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter$ViewHolder;
    goto :goto_0
.end method

.method public isEnabled(I)Z
    .locals 2
    .parameter "position"

    .prologue
    .line 51
    iget-object v1, p0, Lcom/bitauto/autoeasy/news/Adapter/DealerAdapter;->list:Ljava/util/ArrayList;

    invoke-virtual {v1, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/Object/Dealer;->getVendorName()Ljava/lang/String;

    move-result-object v0

    .line 52
    .local v0, url:Ljava/lang/String;
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v1

    if-lez v1, :cond_0

    .line 53
    const/4 v1, 0x1

    .line 55
    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method
